package com.gmscosmo.model;

public class Node {
    private Integer nodeId;
    private Integer clusterId;
    private String host;
    private String interHost;
    private String to_janus;
    private Integer participant;

    public Integer getNodeId() {
        return nodeId;
    }

    public void setNodeId(Integer nodeId) {
        this.nodeId = nodeId;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getTo_janus() {
        return to_janus;
    }

    public void setTo_janus(String to_janus) {
        this.to_janus = to_janus;
    }

    public Integer getParticipant() {
        return participant;
    }

    public void setParticipant(Integer participant) {
        this.participant = participant;
    }

    public Integer getClusterId() {
        return clusterId;
    }

    public void setClusterId(Integer clusterId) {
        this.clusterId = clusterId;
    }

    public String getInterHost() {
        return interHost;
    }

    public void setInterHost(String interHost) {
        this.interHost = interHost;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        Node node = (Node) obj;
        return host.equals(node.host) || to_janus.equals(node.to_janus) || (clusterId.equals(node.clusterId) && interHost.equals(node.interHost));
    }

    @Override
    public String toString() {
        return "Node{" +
                "nodeId=" + nodeId +
                ", clusterId=" + clusterId +
                ", host='" + host + '\'' +
                ", interHost='" + interHost + '\'' +
                ", to_janus='" + to_janus + '\'' +
                ", participant=" + participant +
                '}';
    }

}
